package com.example.zkweixiu.app.activity;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.example.zkweixiu.app.R;
import com.example.zkweixiu.app.pro.PublicPro;
import com.vondear.rxtool.RxActivityTool;
import com.yanzhenjie.sofia.Sofia;

public class ChangeNumber1Activity extends AppCompatActivity implements View.OnClickListener {
    private Intent intent;
    private TextView tv_login11;
    private RelativeLayout rl_change;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_change_number1);
        Sofia.with(ChangeNumber1Activity.this).statusBarDarkFont().statusBarBackground(Color.parseColor("#FFFFFF"));

        tv_login11 = findViewById(R.id.tv_login11);
         rl_change  = findViewById(R.id.rl_change);
        ImageView iv_fanhui = findViewById(R.id.iv_fanhui);
        View iv_fanhui2 = findViewById(R.id.iv_fanhui2);

        iv_fanhui.setOnClickListener(this);
        iv_fanhui2.setOnClickListener(this);

        rl_change.setOnClickListener(this);

        RxActivityTool.addActivity(ChangeNumber1Activity.this);
    }
    @Override
    public void onResume() {
        super.onResume();
        if (PublicPro.userBean != null) {

            String guaPhone = PublicPro.userBean.getData().getGuaPhone();
            StringBuilder sb = new StringBuilder(guaPhone);
            sb.replace(3,9,"******");
            tv_login11.setText(sb.toString());
        }
    }
    @Override
    public void onClick(View view) {
        switch (view.getId()){
            case R.id.rl_change:
                intent = new Intent(this, ChangeNumber3Activity.class);// 账号修改 - 验证码
                startActivity(intent);
                break;
            case R.id.iv_fanhui:
                finish();
                break;
            case R.id.iv_fanhui2:
                finish();
                break;
        }
    }
}
